Going forward, AI algorithms will be incorporated into more and more everyday applications. For example, you might want to include an image classifier in a smart phone app. To do this, you'd use a deep learning model trained on hundreds of thousands of images as part of the overall application architecture. A large part of software development in the future will be using these types of models as common parts of applications.
NOTES:
tensorflow/tensorflow:2.12.0-gpu-jupyterdocker compose -f "docker-compose.yaml" up -d --buildAuthor: Stefan Grandl (July 2023)
In this project, you'll train an image classifier to recognize different species of flowers. You can imagine using something like this in a phone app that tells you the name of the flower your camera is looking at. In practice you'd train this classifier, then export it for use in your application. We'll be using this dataset from Oxford of 102 flower categories, you can see a few examples below.
The project is broken down into multiple steps:
We'll lead you through each part which you'll implement in Python.
When you've completed this project, you'll have an application that can be trained on any set of labeled images. Here your network will be learning about flowers and end up as a command line application. But, what you do with your new skills depends on your imagination and effort in building a dataset. For example, imagine an app where you take a picture of a car, it tells you what the make and model is, then looks up information about it. Go build your own dataset and make something new.
# import Tensorflow
import tensorflow as tf
import tensorflow_hub as hub
import tensorflow_datasets as tfds
2023-07-14 15:58:21.844268: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
# TODO: Make all other necessary imports.
import json
import numpy as np
import matplotlib.pyplot as plt
import plotly.subplots as sp
import plotly.graph_objects as go
Here you'll use tensorflow_datasets to load the Oxford Flowers 102 dataset. This dataset has 3 splits: 'train', 'test', and 'validation'. You'll also need to make sure the training data is normalized and resized to 224x224 pixels as required by the pre-trained networks.
The validation and testing sets are used to measure the model's performance on data it hasn't seen yet, but you'll still need to normalize and resize the images to the appropriate size.
# TODO: Load the dataset with TensorFlow Datasets.
dataset, dataset_info = tfds.load(
"oxford_flowers102", as_supervised=True, with_info=True
)
# TODO: Create a training set, a validation set and a test set.
training_set, validation_set, test_set = (
dataset["train"],
dataset["validation"],
dataset["test"],
)
2023-07-14 15:58:29.267143: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1635] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 29124 MB memory: -> device: 0, name: Tesla V100-DGXS-32GB, pci bus id: 0000:07:00.0, compute capability: 7.0 2023-07-14 15:58:29.268608: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1635] Created device /job:localhost/replica:0/task:0/device:GPU:1 with 30922 MB memory: -> device: 1, name: Tesla V100-DGXS-32GB, pci bus id: 0000:08:00.0, compute capability: 7.0 2023-07-14 15:58:29.269106: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1635] Created device /job:localhost/replica:0/task:0/device:GPU:2 with 30922 MB memory: -> device: 2, name: Tesla V100-DGXS-32GB, pci bus id: 0000:0e:00.0, compute capability: 7.0
# TODO: Get the number of examples in each set from the dataset info.
print(
"Number of examples in the train set:",
dataset_info.splits["train"].num_examples,
)
print(
"Number of examples in the validation set:",
dataset_info.splits["validation"].num_examples,
)
print("Number of examples in the test set:", dataset_info.splits["test"].num_examples)
# TODO: Get the number of classes in the dataset from the dataset info.
num_classes = dataset_info.features["label"].num_classes
print("Number of classes in the dataset:", num_classes)
Number of examples in the train set: 1020 Number of examples in the validation set: 1020 Number of examples in the test set: 6149 Number of classes in the dataset: 102
# TODO: Print the shape and corresponding label of 3 images in the training set.
for _img, _label in training_set.take(3):
img = _img.numpy()
label = _label.numpy()
plt.imshow(img)
plt.show()
print('Image shape:', img.shape)
print('Image label:', label)
2023-07-14 15:58:29.989186: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'Placeholder/_3' with dtype int64 and shape [1]
[[{{node Placeholder/_3}}]]
2023-07-14 15:58:29.989665: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'Placeholder/_1' with dtype string and shape [1]
[[{{node Placeholder/_1}}]]
Image shape: (500, 667, 3) Image label: 72
Image shape: (500, 666, 3) Image label: 84
Image shape: (670, 500, 3) Image label: 70
# TODO: Plot 1 image from the training set. Set the title
# of the plot to the corresponding image label.
for _img, _label in training_set.take(1):
img = _img.numpy()
label = _label.numpy()
plt.imshow(img)
plt.title(label)
2023-07-14 15:58:31.119792: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'Placeholder/_4' with dtype int64 and shape [1]
[[{{node Placeholder/_4}}]]
2023-07-14 15:58:31.120385: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'Placeholder/_4' with dtype int64 and shape [1]
[[{{node Placeholder/_4}}]]
Text(0.5, 1.0, '72')
You'll also need to load in a mapping from label to category name. You can find this in the file label_map.json. It's a JSON object which you can read in with the json module. This will give you a dictionary mapping the integer coded labels to the actual names of the flowers.
with open('app/label_map.json', 'r') as f:
class_names = json.load(f)
# TODO: Plot 1 image from the training set. Set the title
# of the plot to the corresponding class name.
for _img, _label in training_set.take(1):
img = _img.numpy()
label = _label.numpy()
plt.imshow(img)
plt.title(class_names[str(label)])
2023-07-14 15:58:31.668820: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'Placeholder/_3' with dtype int64 and shape [1]
[[{{node Placeholder/_3}}]]
2023-07-14 15:58:31.669396: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'Placeholder/_4' with dtype int64 and shape [1]
[[{{node Placeholder/_4}}]]
Text(0.5, 1.0, 'azalea')
# TODO: Create a pipeline for each set.
BATCH_SIZE = 32
IMG_SIZE = 224
TRAIN_SPLIT = 60
n_imgs_total = dataset_info.splits['train'].num_examples
n_imgs_train = (n_imgs_total * TRAIN_SPLIT) // 100
def prepare_img(_img, _label):
img = tf.cast(_img, tf.float32)
img = tf.image.resize(img, (IMG_SIZE, IMG_SIZE))
img /= 255
return img, _label
batches_train = training_set.shuffle(n_imgs_train).map(prepare_img).batch(BATCH_SIZE).prefetch(1)
batches_val = validation_set.map(prepare_img).batch(BATCH_SIZE).prefetch(1)
batches_test = test_set.map(prepare_img).batch(BATCH_SIZE).prefetch(1)
Now that the data is ready, it's time to build and train the classifier. You should use the MobileNet pre-trained model from TensorFlow Hub to get the image features. Build and train a new feed-forward classifier using those features.
We're going to leave this part up to you. If you want to talk through it with someone, chat with your fellow students!
Refer to the rubric for guidance on successfully completing this section. Things you'll need to do:
We've left a cell open for you below, but use as many as you need. Our advice is to break the problem up into smaller parts you can run separately. Check that each part is doing what you expect, then move on to the next. You'll likely find that as you work through each part, you'll need to go back and modify your previous code. This is totally normal!
When training make sure you're updating only the weights of the feed-forward network. You should be able to get the validation accuracy above 70% if you build everything right.
Note for Workspace users: One important tip if you're using the workspace to run your code: To avoid having your workspace disconnect during the long-running tasks in this notebook, please read in the earlier page in this lesson called Intro to GPU Workspaces about Keeping Your Session Active. You'll want to include code from the workspace_utils.py module. Also, If your model is over 1 GB when saved as a checkpoint, there might be issues with saving backups in your workspace. If your saved checkpoint is larger than 1 GB (you can open a terminal and check with ls -lh), you should reduce the size of your hidden layers and train again.
# TODO: Build and train your network.
# load MobileNet from TensorFlow Hub
module_url = "https://tfhub.dev/google/tf2-preview/mobilenet_v2/feature_vector/4"
mobilenet = hub.KerasLayer(module_url, input_shape=(IMG_SIZE, IMG_SIZE, 3), trainable=False)
# create a new model using MobileNet as a feature extractor
model = tf.keras.Sequential([
mobilenet,
tf.keras.layers.Dense(num_classes, activation='softmax') # add a final classification layer
])
model.summary()
Model: "sequential_4"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
keras_layer_4 (KerasLayer) (None, 1280) 2257984
dense_4 (Dense) (None, 102) 130662
=================================================================
Total params: 2,388,646
Trainable params: 130,662
Non-trainable params: 2,257,984
_________________________________________________________________
physical_devices = tf.config.list_physical_devices('GPU')
print("Num GPUs:", len(physical_devices))
Num GPUs: 3
# train the model
EPOCHS = 50
N_CONSEC_EPOCHS = 5
model.compile(
optimizer = 'adam',
loss = 'sparse_categorical_crossentropy',
metrics = ['accuracy'],
)
# stop training the validation loss if it doesn't get improved for N_CONSEC_EPOCHS consecutive epochs
early_stopping = tf.keras.callbacks.EarlyStopping(
monitor = 'val_loss',
patience = N_CONSEC_EPOCHS,
min_delta = 0.05,
)
history = model.fit(
batches_train,
epochs = EPOCHS,
validation_data = batches_val,
callbacks = [early_stopping],
)
Epoch 1/50
2023-07-14 20:44:11.349779: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like/StatefulPartitionedCall' with dtype float and shape [?,1,1,1280]
[[{{node gradients/zeros_like/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.349915: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall' with dtype float and shape [?,7,7,1280]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.350017: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_37/StatefulPartitionedCall' with dtype float and shape [?,7,7,320]
[[{{node gradients/zeros_like_37/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.350114: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_35/StatefulPartitionedCall' with dtype float and shape [?,7,7,960]
[[{{node gradients/zeros_like_35/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.350210: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_36/StatefulPartitionedCall' with dtype float and shape [?,7,7,960]
[[{{node gradients/zeros_like_36/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.350306: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_38' with dtype float and shape [?,7,7,160]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_38}}]]
2023-07-14 20:44:11.350399: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_40' with dtype float and shape [?,7,7,160]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_40}}]]
2023-07-14 20:44:11.350497: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_41' with dtype float and shape [?,7,7,160]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_41}}]]
2023-07-14 20:44:11.350604: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_31/StatefulPartitionedCall' with dtype float and shape [?,7,7,960]
[[{{node gradients/zeros_like_31/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.350704: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_32/StatefulPartitionedCall' with dtype float and shape [?,7,7,960]
[[{{node gradients/zeros_like_32/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.350802: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_71' with dtype float and shape [?,7,7,160]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_71}}]]
2023-07-14 20:44:11.350899: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_72' with dtype float and shape [?,7,7,160]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_72}}]]
2023-07-14 20:44:11.350996: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_27/StatefulPartitionedCall' with dtype float and shape [?,7,7,960]
[[{{node gradients/zeros_like_27/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.351094: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_28/StatefulPartitionedCall' with dtype float and shape [?,7,7,960]
[[{{node gradients/zeros_like_28/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.351190: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_23/StatefulPartitionedCall' with dtype float and shape [?,7,7,576]
[[{{node gradients/zeros_like_23/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.351288: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_24/StatefulPartitionedCall' with dtype float and shape [?,14,14,576]
[[{{node gradients/zeros_like_24/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.351383: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_130' with dtype float and shape [?,14,14,96]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_130}}]]
2023-07-14 20:44:11.351477: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_132' with dtype float and shape [?,14,14,96]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_132}}]]
2023-07-14 20:44:11.351570: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_133' with dtype float and shape [?,14,14,96]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_133}}]]
2023-07-14 20:44:11.351664: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_19/StatefulPartitionedCall' with dtype float and shape [?,14,14,576]
[[{{node gradients/zeros_like_19/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.351759: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_20/StatefulPartitionedCall' with dtype float and shape [?,14,14,576]
[[{{node gradients/zeros_like_20/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.351854: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_163' with dtype float and shape [?,14,14,96]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_163}}]]
2023-07-14 20:44:11.351947: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_164' with dtype float and shape [?,14,14,96]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_164}}]]
2023-07-14 20:44:11.352041: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_15/StatefulPartitionedCall' with dtype float and shape [?,14,14,576]
[[{{node gradients/zeros_like_15/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.352139: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_16/StatefulPartitionedCall' with dtype float and shape [?,14,14,576]
[[{{node gradients/zeros_like_16/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.352236: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_11/StatefulPartitionedCall' with dtype float and shape [?,14,14,384]
[[{{node gradients/zeros_like_11/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.352334: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_12/StatefulPartitionedCall' with dtype float and shape [?,14,14,384]
[[{{node gradients/zeros_like_12/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.352431: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_222' with dtype float and shape [?,14,14,64]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_222}}]]
2023-07-14 20:44:11.352528: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_224' with dtype float and shape [?,14,14,64]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_224}}]]
2023-07-14 20:44:11.352624: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_225' with dtype float and shape [?,14,14,64]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_225}}]]
2023-07-14 20:44:11.352720: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_7/StatefulPartitionedCall' with dtype float and shape [?,14,14,384]
[[{{node gradients/zeros_like_7/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.352817: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_8/StatefulPartitionedCall' with dtype float and shape [?,14,14,384]
[[{{node gradients/zeros_like_8/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.352915: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_255' with dtype float and shape [?,14,14,64]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_255}}]]
2023-07-14 20:44:11.353011: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_256' with dtype float and shape [?,14,14,64]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_256}}]]
2023-07-14 20:44:11.353107: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_3/StatefulPartitionedCall' with dtype float and shape [?,14,14,384]
[[{{node gradients/zeros_like_3/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.353205: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_4/StatefulPartitionedCall' with dtype float and shape [?,14,14,384]
[[{{node gradients/zeros_like_4/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.353299: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_286' with dtype float and shape [?,14,14,64]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_286}}]]
2023-07-14 20:44:11.353393: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_287' with dtype float and shape [?,14,14,64]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_287}}]]
2023-07-14 20:44:11.353490: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_67/StatefulPartitionedCall' with dtype float and shape [?,14,14,384]
[[{{node gradients/zeros_like_67/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.353587: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_68/StatefulPartitionedCall' with dtype float and shape [?,14,14,384]
[[{{node gradients/zeros_like_68/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.353681: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_63/StatefulPartitionedCall' with dtype float and shape [?,14,14,192]
[[{{node gradients/zeros_like_63/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.353775: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_64/StatefulPartitionedCall' with dtype float and shape [?,28,28,192]
[[{{node gradients/zeros_like_64/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.353870: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_345' with dtype float and shape [?,28,28,32]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_345}}]]
2023-07-14 20:44:11.353964: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_347' with dtype float and shape [?,28,28,32]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_347}}]]
2023-07-14 20:44:11.354057: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_348' with dtype float and shape [?,28,28,32]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_348}}]]
2023-07-14 20:44:11.354151: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_59/StatefulPartitionedCall' with dtype float and shape [?,28,28,192]
[[{{node gradients/zeros_like_59/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.354246: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_60/StatefulPartitionedCall' with dtype float and shape [?,28,28,192]
[[{{node gradients/zeros_like_60/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.354341: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_378' with dtype float and shape [?,28,28,32]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_378}}]]
2023-07-14 20:44:11.354435: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_379' with dtype float and shape [?,28,28,32]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_379}}]]
2023-07-14 20:44:11.354541: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_55/StatefulPartitionedCall' with dtype float and shape [?,28,28,192]
[[{{node gradients/zeros_like_55/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.354639: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_56/StatefulPartitionedCall' with dtype float and shape [?,28,28,192]
[[{{node gradients/zeros_like_56/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.354734: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_51/StatefulPartitionedCall' with dtype float and shape [?,28,28,144]
[[{{node gradients/zeros_like_51/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.354829: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_52/StatefulPartitionedCall' with dtype float and shape [?,56,56,144]
[[{{node gradients/zeros_like_52/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.354924: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_437' with dtype float and shape [?,56,56,24]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_437}}]]
2023-07-14 20:44:11.355017: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_439' with dtype float and shape [?,56,56,24]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_439}}]]
2023-07-14 20:44:11.355111: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_440' with dtype float and shape [?,56,56,24]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_440}}]]
2023-07-14 20:44:11.355204: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_47/StatefulPartitionedCall' with dtype float and shape [?,56,56,144]
[[{{node gradients/zeros_like_47/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.355307: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_48/StatefulPartitionedCall' with dtype float and shape [?,56,56,144]
[[{{node gradients/zeros_like_48/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.355401: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_43/StatefulPartitionedCall' with dtype float and shape [?,56,56,96]
[[{{node gradients/zeros_like_43/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.355496: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_44/StatefulPartitionedCall' with dtype float and shape [?,112,112,96]
[[{{node gradients/zeros_like_44/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.355591: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_498' with dtype float and shape [?,112,112,16]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_498}}]]
2023-07-14 20:44:11.355685: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/zeros_like_40/StatefulPartitionedCall' with dtype float and shape [?,112,112,32]
[[{{node gradients/zeros_like_40/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.355779: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_518' with dtype float and shape [?,112,112,32]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_518}}]]
2023-07-14 20:44:11.355873: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_528' with dtype float and shape [?,224,224,3]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_528}}]]
2023-07-14 20:44:11.355966: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_530' with dtype float and shape [?,224,224,3]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_530}}]]
2023-07-14 20:44:11.356060: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_531' with dtype float
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_531}}]]
2023-07-14 20:44:11.356154: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_532' with dtype float and shape [?,224,224,3]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_532}}]]
2023-07-14 20:44:11.356248: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_533' with dtype float
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_533}}]]
2023-07-14 20:44:11.814731: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall' with dtype float and shape [?,1,1,1280]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall}}]]
2023-07-14 20:44:11.814866: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_3' with dtype float and shape [?,14,14,384]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_3}}]]
2023-07-14 20:44:11.814966: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_4' with dtype float and shape [?,14,14,384]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_4}}]]
2023-07-14 20:44:11.815062: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_7' with dtype float and shape [?,14,14,384]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_7}}]]
2023-07-14 20:44:11.815156: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_8' with dtype float and shape [?,14,14,384]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_8}}]]
2023-07-14 20:44:11.815250: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_11' with dtype float and shape [?,14,14,384]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_11}}]]
2023-07-14 20:44:11.815344: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_12' with dtype float and shape [?,14,14,384]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_12}}]]
2023-07-14 20:44:11.815441: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_15' with dtype float and shape [?,14,14,576]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_15}}]]
2023-07-14 20:44:11.815537: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_16' with dtype float and shape [?,14,14,576]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_16}}]]
2023-07-14 20:44:11.815634: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_19' with dtype float and shape [?,14,14,576]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_19}}]]
2023-07-14 20:44:11.815730: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_20' with dtype float and shape [?,14,14,576]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_20}}]]
2023-07-14 20:44:11.815826: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_23' with dtype float and shape [?,7,7,576]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_23}}]]
2023-07-14 20:44:11.815921: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_24' with dtype float and shape [?,14,14,576]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_24}}]]
2023-07-14 20:44:11.816016: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_27' with dtype float and shape [?,7,7,960]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_27}}]]
2023-07-14 20:44:11.816112: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_28' with dtype float and shape [?,7,7,960]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_28}}]]
2023-07-14 20:44:11.816208: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_31' with dtype float and shape [?,7,7,960]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_31}}]]
2023-07-14 20:44:11.816304: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_32' with dtype float and shape [?,7,7,960]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_32}}]]
2023-07-14 20:44:11.816399: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_35' with dtype float and shape [?,7,7,960]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_35}}]]
2023-07-14 20:44:11.816495: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_36' with dtype float and shape [?,7,7,960]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_36}}]]
2023-07-14 20:44:11.816590: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_37' with dtype float and shape [?,7,7,320]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_37}}]]
2023-07-14 20:44:11.816685: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_40' with dtype float and shape [?,112,112,32]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_40}}]]
2023-07-14 20:44:11.816781: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_43' with dtype float and shape [?,56,56,96]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_43}}]]
2023-07-14 20:44:11.816876: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_44' with dtype float and shape [?,112,112,96]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_44}}]]
2023-07-14 20:44:11.816971: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_47' with dtype float and shape [?,56,56,144]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_47}}]]
2023-07-14 20:44:11.817066: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_48' with dtype float and shape [?,56,56,144]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_48}}]]
2023-07-14 20:44:11.817162: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_51' with dtype float and shape [?,28,28,144]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_51}}]]
2023-07-14 20:44:11.817257: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_52' with dtype float and shape [?,56,56,144]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_52}}]]
2023-07-14 20:44:11.817353: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_55' with dtype float and shape [?,28,28,192]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_55}}]]
2023-07-14 20:44:11.817449: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_56' with dtype float and shape [?,28,28,192]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_56}}]]
2023-07-14 20:44:11.817546: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_59' with dtype float and shape [?,28,28,192]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_59}}]]
2023-07-14 20:44:11.817641: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_60' with dtype float and shape [?,28,28,192]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_60}}]]
2023-07-14 20:44:11.817737: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_63' with dtype float and shape [?,14,14,192]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_63}}]]
2023-07-14 20:44:11.817834: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_64' with dtype float and shape [?,28,28,192]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_64}}]]
2023-07-14 20:44:11.817929: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_67' with dtype float and shape [?,14,14,384]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_67}}]]
2023-07-14 20:44:11.818024: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_68' with dtype float and shape [?,14,14,384]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_68}}]]
2023-07-14 20:44:11.818120: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_70' with dtype float and shape [?,7,7,1280]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_70}}]]
2023-07-14 20:44:11.818216: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_108' with dtype float and shape [?,7,7,160]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_108}}]]
2023-07-14 20:44:11.818311: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_110' with dtype float and shape [?,7,7,160]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_110}}]]
2023-07-14 20:44:11.818407: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_111' with dtype float and shape [?,7,7,160]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_111}}]]
2023-07-14 20:44:11.818502: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_141' with dtype float and shape [?,7,7,160]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_141}}]]
2023-07-14 20:44:11.818608: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_142' with dtype float and shape [?,7,7,160]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_142}}]]
2023-07-14 20:44:11.818704: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_200' with dtype float and shape [?,14,14,96]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_200}}]]
2023-07-14 20:44:11.818798: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_202' with dtype float and shape [?,14,14,96]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_202}}]]
2023-07-14 20:44:11.818893: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_203' with dtype float and shape [?,14,14,96]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_203}}]]
2023-07-14 20:44:11.818987: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_233' with dtype float and shape [?,14,14,96]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_233}}]]
2023-07-14 20:44:11.819082: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_234' with dtype float and shape [?,14,14,96]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_234}}]]
2023-07-14 20:44:11.819177: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_292' with dtype float and shape [?,14,14,64]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_292}}]]
2023-07-14 20:44:11.819271: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_294' with dtype float and shape [?,14,14,64]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_294}}]]
2023-07-14 20:44:11.819367: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_295' with dtype float and shape [?,14,14,64]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_295}}]]
2023-07-14 20:44:11.819462: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_325' with dtype float and shape [?,14,14,64]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_325}}]]
2023-07-14 20:44:11.819556: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_326' with dtype float and shape [?,14,14,64]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_326}}]]
2023-07-14 20:44:11.819651: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_356' with dtype float and shape [?,14,14,64]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_356}}]]
2023-07-14 20:44:11.819746: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_357' with dtype float and shape [?,14,14,64]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_357}}]]
2023-07-14 20:44:11.819842: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_415' with dtype float and shape [?,28,28,32]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_415}}]]
2023-07-14 20:44:11.819938: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_417' with dtype float and shape [?,28,28,32]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_417}}]]
2023-07-14 20:44:11.820033: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_418' with dtype float and shape [?,28,28,32]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_418}}]]
2023-07-14 20:44:11.820128: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_448' with dtype float and shape [?,28,28,32]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_448}}]]
2023-07-14 20:44:11.820222: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_449' with dtype float and shape [?,28,28,32]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_449}}]]
2023-07-14 20:44:11.820318: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_507' with dtype float and shape [?,56,56,24]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_507}}]]
2023-07-14 20:44:11.820414: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_509' with dtype float and shape [?,56,56,24]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_509}}]]
2023-07-14 20:44:11.820509: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_510' with dtype float and shape [?,56,56,24]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_510}}]]
2023-07-14 20:44:11.820605: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_568' with dtype float and shape [?,112,112,16]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_568}}]]
2023-07-14 20:44:11.820698: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_588' with dtype float and shape [?,112,112,32]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_588}}]]
2023-07-14 20:44:11.820795: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_598' with dtype float and shape [?,224,224,3]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_598}}]]
2023-07-14 20:44:11.820891: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_600' with dtype float and shape [?,224,224,3]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_600}}]]
2023-07-14 20:44:11.820987: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_601' with dtype float
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_601}}]]
2023-07-14 20:44:11.821084: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_602' with dtype float and shape [?,224,224,3]
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_602}}]]
2023-07-14 20:44:11.821178: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_603' with dtype float
[[{{node gradients/StatefulPartitionedCall_grad/StatefulPartitionedCall_603}}]]
32/32 [==============================] - 6s 63ms/step - loss: 4.2570 - accuracy: 0.1108 - val_loss: 3.0630 - val_accuracy: 0.3745 Epoch 2/50 32/32 [==============================] - 2s 40ms/step - loss: 2.0620 - accuracy: 0.6588 - val_loss: 2.0016 - val_accuracy: 0.6422 Epoch 3/50 32/32 [==============================] - 2s 40ms/step - loss: 1.1055 - accuracy: 0.8892 - val_loss: 1.5292 - val_accuracy: 0.7363 Epoch 4/50 32/32 [==============================] - 1s 39ms/step - loss: 0.6714 - accuracy: 0.9578 - val_loss: 1.2960 - val_accuracy: 0.7667 Epoch 5/50 32/32 [==============================] - 2s 42ms/step - loss: 0.4469 - accuracy: 0.9804 - val_loss: 1.1504 - val_accuracy: 0.7902 Epoch 6/50 32/32 [==============================] - 2s 38ms/step - loss: 0.3205 - accuracy: 0.9902 - val_loss: 1.0661 - val_accuracy: 0.8000 Epoch 7/50 32/32 [==============================] - 2s 40ms/step - loss: 0.2399 - accuracy: 0.9971 - val_loss: 0.9961 - val_accuracy: 0.8059 Epoch 8/50 32/32 [==============================] - 2s 40ms/step - loss: 0.1857 - accuracy: 0.9990 - val_loss: 0.9490 - val_accuracy: 0.8147 Epoch 9/50 32/32 [==============================] - 2s 41ms/step - loss: 0.1480 - accuracy: 1.0000 - val_loss: 0.9195 - val_accuracy: 0.8167 Epoch 10/50 32/32 [==============================] - 2s 40ms/step - loss: 0.1211 - accuracy: 1.0000 - val_loss: 0.8892 - val_accuracy: 0.8216 Epoch 11/50 32/32 [==============================] - 1s 37ms/step - loss: 0.1007 - accuracy: 1.0000 - val_loss: 0.8655 - val_accuracy: 0.8225 Epoch 12/50 32/32 [==============================] - 1s 39ms/step - loss: 0.0866 - accuracy: 1.0000 - val_loss: 0.8513 - val_accuracy: 0.8186 Epoch 13/50 32/32 [==============================] - 2s 41ms/step - loss: 0.0738 - accuracy: 1.0000 - val_loss: 0.8320 - val_accuracy: 0.8176 Epoch 14/50 32/32 [==============================] - 2s 39ms/step - loss: 0.0649 - accuracy: 1.0000 - val_loss: 0.8181 - val_accuracy: 0.8216 Epoch 15/50 32/32 [==============================] - 2s 41ms/step - loss: 0.0572 - accuracy: 1.0000 - val_loss: 0.8084 - val_accuracy: 0.8235 Epoch 16/50 32/32 [==============================] - 2s 44ms/step - loss: 0.0508 - accuracy: 1.0000 - val_loss: 0.7974 - val_accuracy: 0.8265 Epoch 17/50 32/32 [==============================] - 2s 42ms/step - loss: 0.0457 - accuracy: 1.0000 - val_loss: 0.7882 - val_accuracy: 0.8265 Epoch 18/50 32/32 [==============================] - 2s 39ms/step - loss: 0.0412 - accuracy: 1.0000 - val_loss: 0.7796 - val_accuracy: 0.8275 Epoch 19/50 32/32 [==============================] - 2s 44ms/step - loss: 0.0375 - accuracy: 1.0000 - val_loss: 0.7725 - val_accuracy: 0.8284 Epoch 20/50 32/32 [==============================] - 2s 44ms/step - loss: 0.0344 - accuracy: 1.0000 - val_loss: 0.7644 - val_accuracy: 0.8294
# TODO: Plot the loss and accuracy values achieved during training for the training and validation set.
training_accuracy = history.history['accuracy']
validation_accuracy = history.history['val_accuracy']
training_loss = history.history['loss']
validation_loss = history.history['val_loss']
epochs_range = range(len(training_accuracy))
fig = sp.make_subplots(rows=2, cols=1, subplot_titles=("Accuracy", "Loss"))
fig.add_trace(go.Scatter(x=list(epochs_range), y=training_accuracy, mode='lines', name='Training Accuracy'), row=1, col=1)
fig.add_trace(go.Scatter(x=list(epochs_range), y=validation_accuracy, mode='lines', name='Validation Accuracy'), row=1, col=1)
fig.add_trace(go.Scatter(x=list(epochs_range), y=training_loss, mode='lines', name='Training Loss'), row=2, col=1)
fig.add_trace(go.Scatter(x=list(epochs_range), y=validation_loss, mode='lines', name='Validation Loss'), row=2, col=1)
fig.update_layout(
title=f"Training and Validation Metrics (early stopping after epoch {len(training_accuracy)})",
xaxis_title='Epochs',
height=600,
showlegend=True,
)
fig.update_yaxes(title_text="Accuracy", row=1, col=1)
fig.update_yaxes(title_text="Loss", row=2, col=1)
fig.show()
It's good practice to test your trained network on test data, images the network has never seen either in training or validation. This will give you a good estimate for the model's performance on completely new images. You should be able to reach around 70% accuracy on the test set if the model has been trained well.
# TODO: Print the loss and accuracy values achieved on the entire test set.
# First calculate test accuracy and loss...
test_loss, test_accuracy = model.evaluate(batches_test)
193/193 [==============================] - 3s 17ms/step - loss: 0.8984 - accuracy: 0.7835
# then print the final values
print(f"Test Accuracy: {test_accuracy:.4f}")
print(f"Test Loss: {test_loss:.4f}")
Test Accuracy: 0.7835 Test Loss: 0.8984
Now that your network is trained, save the model so you can load it later for making inference. In the cell below save your model as a Keras model (i.e. save it as an HDF5 file).
# TODO: Save your trained model as a Keras model.
tf_model_filepath = 'app/model/tf_model.h5'
model.save(tf_model_filepath)
Load the Keras model you saved above.
# TODO: Load the Keras model
reloaded_keras_model = tf.keras.models.load_model(
tf_model_filepath,
custom_objects={
'KerasLayer': hub.KerasLayer
}
)
reloaded_keras_model.summary()
Model: "sequential_4"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
keras_layer_4 (KerasLayer) (None, 1280) 2257984
dense_4 (Dense) (None, 102) 130662
=================================================================
Total params: 2,388,646
Trainable params: 130,662
Non-trainable params: 2,257,984
_________________________________________________________________
Now you'll write a function that uses your trained network for inference. Write a function called predict that takes an image, a model, and then returns the top $K$ most likely class labels along with the probabilities. The function call should look like:
probs, classes = predict(image_path, model, top_k)
If top_k=5 the output of the predict function should be something like this:
probs, classes = predict(image_path, model, 5)
print(probs)
print(classes)
> [ 0.01558163 0.01541934 0.01452626 0.01443549 0.01407339]
> ['70', '3', '45', '62', '55']
Your predict function should use PIL to load the image from the given image_path. You can use the Image.open function to load the images. The Image.open() function returns an Image object. You can convert this Image object to a NumPy array by using the np.asarray() function.
The predict function will also need to handle pre-processing the input image such that it can be used by your model. We recommend you write a separate function called process_image that performs the pre-processing. You can then call the process_image function from the predict function.
The process_image function should take in an image (in the form of a NumPy array) and return an image in the form of a NumPy array with shape (224, 224, 3).
First, you should convert your image into a TensorFlow Tensor and then resize it to the appropriate size using tf.image.resize.
Second, the pixel values of the input images are typically encoded as integers in the range 0-255, but the model expects the pixel values to be floats in the range 0-1. Therefore, you'll also need to normalize the pixel values.
Finally, convert your image back to a NumPy array using the .numpy() method.
# TODO: Create the process_image function
def process_image(_img: np.ndarray) -> np.ndarray:
# Convert the image into a TensorFlow Tensor
img_tensor = tf.convert_to_tensor(_img)
# Resize it to the appropriate size using tf.image.resize
img = tf.image.resize(img_tensor, (IMG_SIZE, IMG_SIZE))
# In order to normalize the images we are going to divide the pixel values by 255.
img /= 255
return img.numpy()
To check your process_image function we have provided 4 images in the ./test_images/ folder:
The code below loads one of the above images using PIL and plots the original image alongside the image produced by your process_image function. If your process_image function works, the plotted image should be the correct size.
from PIL import Image
image_path = 'app/test_images/hard-leaved_pocket_orchid.jpg'
im = Image.open(image_path)
test_image = np.asarray(im)
processed_test_image = process_image(test_image)
fig, (ax1, ax2) = plt.subplots(figsize=(10,10), ncols=2)
ax1.imshow(test_image)
ax1.set_title('Original Image')
ax2.imshow(processed_test_image)
ax2.set_title('Processed Image')
plt.tight_layout()
plt.show()
Once you can get images in the correct format, it's time to write the predict function for making inference with your model.
Remember, the predict function should take an image, a model, and then returns the top $K$ most likely class labels along with the probabilities. The function call should look like:
probs, classes = predict(image_path, model, top_k)
If top_k=5 the output of the predict function should be something like this:
probs, classes = predict(image_path, model, 5)
print(probs)
print(classes)
> [ 0.01558163 0.01541934 0.01452626 0.01443549 0.01407339]
> ['70', '3', '45', '62', '55']
Your predict function should use PIL to load the image from the given image_path. You can use the Image.open function to load the images. The Image.open() function returns an Image object. You can convert this Image object to a NumPy array by using the np.asarray() function.
Note: The image returned by the process_image function is a NumPy array with shape (224, 224, 3) but the model expects the input images to be of shape (1, 224, 224, 3). This extra dimension represents the batch size. We suggest you use the np.expand_dims() function to add the extra dimension.
# TODO: Create the predict function
from typing import Tuple, List
def predict(img_path: str, model: tf.keras.Model, top_k: int) -> Tuple[np.ndarray, List[str]]:
# Set top_k to 1 if it's less than 1, otherwise use the provided value
top_k = 1 if top_k < 1 else top_k
# open and convert the image to a NumPy array
img = Image.open(img_path)
img_arr = np.asarray(img)
# preprocess the image
processed_img = process_image(img_arr)
processed_img_batch = np.expand_dims(processed_img, axis=0)
# make predictions
prediction = model.predict(processed_img_batch)
# get the top k probabilities and corresponding classes
probs, classes = tf.math.top_k(prediction, top_k)
probs = probs.numpy().squeeze()
classes = classes.numpy().squeeze()
# convert the classes to strings
classes = [str(value) for value in classes]
return probs, classes
test_image_path: str = 'app/test_images/hard-leaved_pocket_orchid.jpg'
top_k: int = 5
probs, classes = predict(test_image_path, reloaded_keras_model, top_k)
# print the results
print([round(_prob,4) for _prob in probs])
print(classes)
1/1 [==============================] - 1s 539ms/step [0.9986, 0.0003, 0.0002, 0.0002, 1e-04] ['1', '67', '5', '76', '79']
It's always good to check the predictions made by your model to make sure they are correct. To check your predictions we have provided 4 images in the ./test_images/ folder:
In the cell below use matplotlib to plot the input image alongside the probabilities for the top 5 classes predicted by your model. Plot the probabilities as a bar graph. The plot should look like this:
You can convert from the class integer labels to actual flower names using class_names.
# TODO: Plot the input image along with the top 5 classes
from pathlib import Path
# Define the test image paths and corresponding labels
test_images_dir = Path('app/test_images')
test_image_paths = [str(file) for file in test_images_dir.glob('*.jpg')]
test_labels = [file.stem for file in test_images_dir.glob('*.jpg')]
# Create subplots for each test image
fig, axes = plt.subplots(nrows=len(test_image_paths), ncols=2, figsize=(12, 6 * len(test_image_paths)))
for i, (img_path, label) in enumerate(zip(test_image_paths, test_labels)):
# Predict probabilities and classes for the current image
probs, classes = predict(img_path, reloaded_keras_model, top_k)
flower_classes = []
print("Predicted classes:")
for idx in classes:
print("-", class_names[str(int(idx)+1)])
flower_classes.append(class_names[str(int(idx)+1)])
# Load and display the image
img = Image.open(img_path)
axes[i, 0].imshow(img)
axes[i, 0].set_title(f"Image: {label}")
axes[i, 0].axis('off')
# Plot the probabilities as a bar graph
y_pos = np.arange(len(classes))
axes[i, 1].barh(y_pos, probs, align='center')
axes[i, 1].set_title("Predicted Probabilities")
axes[i, 1].set_aspect(0.1)
axes[i, 1].set_xlim(0, 1.1)
axes[i, 1].set_yticks(y_pos, classes)
axes[i, 1].set_yticklabels(flower_classes)
for j, v in enumerate(probs):
axes[i, 1].text(v, j, str(round(v,4)), color='lightblue')
axes[i, 1].invert_yaxis()
# Adjust the spacing between subplots
plt.tight_layout()
# Show the plot
plt.show()
1/1 [==============================] - 0s 33ms/step Predicted classes: - orange dahlia - english marigold - blanket flower - osteospermum - bishop of llandaff 1/1 [==============================] - 0s 40ms/step Predicted classes: - wild pansy - silverbush - balloon flower - windflower - mexican aster 1/1 [==============================] - 0s 37ms/step Predicted classes: - hard-leaved pocket orchid - bearded iris - tiger lily - passion flower - anthurium 1/1 [==============================] - 0s 36ms/step Predicted classes: - cautleya spicata - wallflower - red ginger - siam tulip - snapdragon